package Controllers;

import Models.*;
import java.util.ArrayList;

/**
 * @author Thomas
 */
public class SupplierCTR {

    private SupplierCollection suppliers;

    public SupplierCTR()
    {
        this.suppliers = SupplierCollection.getInstance();
    }

    public Supplier addSupplier(String name, String address, int zipCode, String city, int phoneNo, String contact, int cvr)
    {
        Supplier newSupplier = new Supplier(name, address, zipCode, city, phoneNo, contact, cvr);
        this.suppliers.addSupplier(newSupplier);
        return newSupplier;
    }

    public ArrayList<Supplier> findSupplier(String name, String address, int zipCode, String city, int phoneNo, String contact, int cvr)
    {
        return this.suppliers.findSupplier(name, address, zipCode, city, phoneNo, contact, cvr);
    }

	public ArrayList<Supplier> getAllSuppliers()
	{
		return suppliers.getAllSuppliers();
	}

    public Supplier getSupplier(int id)
    {
        return this.suppliers.getSupplier(id);
    }

    public void removeSupplier(Supplier supplier)
    {
        this.suppliers.removeSupplier(supplier);
    }
}
